package com.woniuxy.qiantai;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.StringRedisTemplate;

import java.util.concurrent.TimeUnit;

@SpringBootTest
public class lsytest {

    @Autowired
    StringRedisTemplate stringRedisTemplate;


    @Test
    public void test(){

        String email="1004758983@qq.com";
        String code="9VDQ";


        stringRedisTemplate.opsForValue().set(email,code,5, TimeUnit.MINUTES);
        stringRedisTemplate.opsForValue().get(email);
    }




}
